<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Settings - GIAnT API</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="GIAnT API" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: 1.0.0</em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/Atom.html">Atom</a></li>
                                <li><a href="../classes/Codec.html">Codec</a></li>
                                <li><a href="../classes/Constraints.html">Constraints</a></li>
                                <li><a href="../classes/Database.html">Database</a></li>
                                <li><a href="../classes/Exif.html">Exif</a></li>
                                <li><a href="../classes/Export.html">Export</a></li>
                                <li><a href="../classes/Heatmap.html">Heatmap</a></li>
                                <li><a href="../classes/Server.html">Server</a></li>
                                <li><a href="../classes/Settings.html">Settings</a></li>
                                <li><a href="../classes/Utils.html">Utils</a></li>
                            </ul>
                
                
                            <ul id="api-modules" class="apis modules">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>Settings Class</h1>
<div class="box meta">


        <div class="foundat">
            Defined in: <a href="../files/src_settings.js.html#l5"><code>src\settings.js:5</code></a>
        </div>


</div>


<div class="box intro">
    <h2>Settings</h2>
<p>Gives easy access to a key value storage persisted in a single file. <br>
<b>Takes care of the validation of editor settings and constraint settings.</b></p>

</div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                            <li class="index-item method">
                                <a href="#method_check_loaded">check_loaded</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_get">get</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_get_settings_for_constraints">get_settings_for_constraints</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_get_settings_for_frontend">get_settings_for_frontend</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_has">has</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_load">load</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_save">save</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_set">set</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_set_settings_from_frontend">set_settings_from_frontend</a>

                            </li>
                    </ul>
                </div>

                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties">
                            <li class="index-item property">
                                <a href="#property__file_path">_file_path</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property__loaded">_loaded</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property__store">_store</a>

                            </li>
                    </ul>
                </div>


        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_check_loaded" class="method item">
    <h3 class="name"><code>check_loaded</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l73"><code>src\settings.js:73</code></a>
        </p>



    </div>

    <div class="description">
        <p>If the storage is not loaded -&gt; load it.</p>

    </div>




</div>
<div id="method_get" class="method item">
    <h3 class="name"><code>get</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>key</code>
                </li>
                <li class="arg">
                        <code>fallback</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type"></span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l96"><code>src\settings.js:96</code></a>
        </p>



    </div>

    <div class="description">
        <p>Get the value of the key</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">key</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">fallback</code>
                        <span class="type"></span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"></span>:
            </div>
        </div>


</div>
<div id="method_get_settings_for_constraints" class="method item">
    <h3 class="name"><code>get_settings_for_constraints</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"></span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l163"><code>src\settings.js:163</code></a>
        </p>



    </div>

    <div class="description">
        <p>Get the constraint settings Settings._store.constraints</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"></span>:
            </div>
        </div>


</div>
<div id="method_get_settings_for_frontend" class="method item">
    <h3 class="name"><code>get_settings_for_frontend</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"></span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l124"><code>src\settings.js:124</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the whole storage</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"></span>:
            </div>
        </div>


</div>
<div id="method_has" class="method item">
    <h3 class="name"><code>has</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>key</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Boolean</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l112"><code>src\settings.js:112</code></a>
        </p>



    </div>

    <div class="description">
        <p>Check whether the key carries data in the storage</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">key</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Boolean</span>:
            </div>
        </div>


</div>
<div id="method_load" class="method item">
    <h3 class="name"><code>load</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l44"><code>src\settings.js:44</code></a>
        </p>



    </div>

    <div class="description">
        <p>Loads the file</p>

    </div>




</div>
<div id="method_save" class="method item">
    <h3 class="name"><code>save</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l62"><code>src\settings.js:62</code></a>
        </p>



    </div>

    <div class="description">
        <p>Saves the file</p>

    </div>




</div>
<div id="method_set" class="method item">
    <h3 class="name"><code>set</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>key</code>
                </li>
                <li class="arg">
                        <code>value</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l84"><code>src\settings.js:84</code></a>
        </p>



    </div>

    <div class="description">
        <p>Set the key to the value</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">key</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">value</code>
                        <span class="type"></span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_set_settings_from_frontend" class="method item">
    <h3 class="name"><code>set_settings_from_frontend</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>new_settings</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l135"><code>src\settings.js:135</code></a>
        </p>



    </div>

    <div class="description">
        <p>Check the values of the new settings and store them if they are okay</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">new_settings</code>
                        <span class="type"></span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
            </div>

            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

<div id="property__file_path" class="property item">
    <h3 class="name"><code>_file_path</code></h3>
    <span class="type">String</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l35"><code>src\settings.js:35</code></a>
        </p>


    </div>

    <div class="description">
        <p>The path of the settings file</p>

    </div>

        <p><strong>Default:</strong> path.join(__dirname, &#x27;../media/settings/settings.json&#x27;)</p>


</div>
<div id="property__loaded" class="property item">
    <h3 class="name"><code>_loaded</code></h3>
    <span class="type">Boolean</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l26"><code>src\settings.js:26</code></a>
        </p>


    </div>

    <div class="description">
        <p>Whether the in-memory-store was already populated</p>

    </div>

        <p><strong>Default:</strong> false</p>


</div>
<div id="property__store" class="property item">
    <h3 class="name"><code>_store</code></h3>
    <span class="type">Object</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/src_settings.js.html#l17"><code>src\settings.js:17</code></a>
        </p>


    </div>

    <div class="description">
        <p>In memory store</p>

    </div>

        <p><strong>Default:</strong> {}</p>


</div>
            </div>


    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
